package com.zhiyou.springcloud.ribbonconsumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author by zhouyanchao
 * Created on 2018/2/27.
 * Descr:
 */
@RestController
public class ConsumerController {

	@Autowired
	RestTemplate restTemplate;

	@GetMapping("/consumer")
	public String dc(){
		System.out.println("ribbon consumer controller");
		return restTemplate.getForObject("http://EUREKA-CLIENT/dc",String.class);
	}

}
